/*
 * @Author: wang_changtan 2196064304@qq.com
 * @Date: 2024-02-20 08:18:34
 * @LastEditors: wang_changtan 2196064304@qq.com
 * @LastEditTime: 2024-02-20 11:36:33
 * @FilePath: /web_music_app_vue3_vite_ts/vite.config.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path, {join} from 'path';


function resolve(dir: string) {
 
  return join(__dirname, dir)
}


// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    vue(),
  ],
  server:{
    port:5555
  },
  css: {
    preprocessorOptions: {
      less: {
        javascriptEnabled: true,
        modifyVars: {
          hack: `true; @import (reference) "${resolve('src/assets/style/style.less')}";`
        }
      }
    },
  },
  resolve: {
    alias: {
      '@': resolve('src')
    }
  }
})
